﻿@model EM.OA.Portal.Models.CarApplyModels
@{
    ViewBag.Title = "车辆审核";
    Layout = "~/Views/Shared/_LayoutContent.cshtml";
}
<script src="~/Scripts/ckeditor/ckeditor.js" type="text/javascript"></script>
<script type="text/javascript" src="~/Scripts/page/Car/Check.js"></script>

<div>
    @*list*@
    <table id="list" class="easyui-datagrid" toolbar="#toolbar">
    </table>
    <div id="toolbar">
        <div id="tb" style="padding: 3px">
            <span>@Html.LabelFor(m => m.Status)</span>
            <select id="q_Status" name="q_Status" class="easyui-combobox" data-options="panelHeight:'auto'">
                <option value="">全部</option>
                <option value="0" selected="selected">未审核</option>
                <option value="1">已准</option>
                <option value="2">未准</option>
            </select>
            <span>@Html.LabelFor(m => m.UseCarPersonID)</span>
            <input type="hidden" id="q_UseCarPersonID" name="q_UseCarPersonID" />
            <input id="q_UseCarPersonName" type="text" name="q_UseCarPersonName" />
            <a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-search'" onclick="GetUserList()">选择</a>
            <br />
            <span>@Html.LabelFor(m => m.ApplyDate)</span>
            <input class="easyui-datebox" id="q_ApplyDate" name="q_ApplyDate">
            <span>@Html.LabelFor(m => m.ApplyStartTime)</span>
            <input id="q_StartTime" class="easyui-timespinner" data-options="min:'09:00',max:'17:00',required:true,showSeconds:false" style="width: 150px">
            <span>@Html.LabelFor(m => m.ApplyEndTime)</span>
            <input id="q_EndTime" class="easyui-timespinner" data-options="min:'09:00',max:'17:00',required:true,showSeconds:false" style="width: 150px">
            <a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-search'" onclick="doSearch()">查询</a>
        </div>
        <a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-ok'" onclick="check()">审核</a>&nbsp;|
        <a href="#" class="easyui-linkbutton" iconcls="icon-remove" plain="true" onclick="del()">删除</a>

    </div>

    @*Detail*@
    <div id="dlg" class="easyui-dialog" style="width: 500px; height: 400px; padding: 10px 20px"
        closed="true" buttons="#dlg-buttons" modal="true" resizable="true">
        <div id="dlg-buttons">
            <a href="#" class="easyui-linkbutton" iconcls="icon-ok" onclick="save()">保存</a>
            <a href="#" class="easyui-linkbutton" iconcls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">取消</a>
        </div>
        <form id="fm" method="post">
            @Html.HiddenFor(m => m.ApplyID)
            <table>
                <tr>
                    <td>@Html.LabelFor(m => m.Status)</td>
                    <td>
                        <select id="Status" name="Status" class="easyui-combobox" data-options="required:true,panelHeight:'auto'">
                            <option value="0" selected="selected">请选择</option>
                            <option value="1">通过</option>
                            <option value="2">不通过</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>@Html.LabelFor(m => m.ApprovalRemark)</td>
                    <td colspan="3">
                        <input type="hidden" id="ApprovalRemark" name="ApprovalRemark" />
                        @*@Html.TextAreaFor(m => m.ApprovalRemark, new { @style = "width:100%", @cols = "40", @rows = "10", @class = "easyui-validatebox" })*@

                        <textarea cols="5" id="editor4" name="editor4" rows="4">
			            </textarea>
                        <script type="text/javascript">
                            CKEDITOR.replace('editor4', {
                                
                                toolbar: [
					['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink'],
					['FontSize', 'TextColor', 'BGColor']
                                ]
                            });
                        </script>
                    </td>
                </tr>
            </table>
        </form>
    </div>

    @*Userlist*@
    <div id="userdlg" class="easyui-dialog" style="width: 480px; height: 380px; padding: 10px 10px"
        closed="true" buttons="#userdlg-buttons" modal="true" resizable="true">

        <table id="userlist" class="easyui-datagrid" width="100%" toolbar="#usertoolbar">
        </table>
        <div id="usertoolbar">
            <table>
                <tr>
                    <td>
                        <input class="easyui-validatebox" type="text" id="userName" name="userName"
                            value="用户名称" onfocus="if(value==defaultValue){value='';this.style.color='#000'}" onblur="if(!value){value=defaultValue;this.style.color='#999'}" style="color: #999999" />
                    </td>
                    <td>
                        <input value="请选择部门"
                            id="comb_Search_DepartmentParentID" class="easyui-combotree"
                            data-options="url:'/Department/GetTreeList',required:true,
                        onSelect: function(rec){  
                            $('#DepartmentParentID').val(rec.id); }" />
                    </td>
                    <td>
                        <a href="#" class="easyui-linkbutton" iconcls="icon-search" onclick="Search()">查询</a>
                    </td>
                </tr>
            </table>


        </div>

        <div id="userdlg-buttons">
            <a href="#" class="easyui-linkbutton" iconcls="icon-ok" onclick="SelectUser()">确定</a>
            <a href="#" class="easyui-linkbutton" iconcls="icon-cancel" onclick="javascript:$('#userdlg').dialog('close')">取消</a>
        </div>
    </div>
</div>
